import vue from 'rollup-plugin-vue'
import typescript from 'rollup-plugin-typescript2'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import scss from 'rollup-plugin-scss'

//const file = type => `dist/${name}.${type}.js`
const overrides = {
    compilerOptions: { declaration: true },
    exclude: ["tests/**/*.ts", "tests/**/*.tsx"]
}

const name = 'ygbh';
const file = type => `lib/${name}.js`;
export { name, file }
export default {
    input: 'packages/index.ts',
    output: [
        {
            file: './lib/ygbh.js',
            format: 'umd',
            name: 'ygbh'
        },
    ],
    plugins: [
        nodeResolve(),
        typescript({ tsconfigOverride: overrides }),
        vue({
            compileTemplate: true
        }),
        scss(),
    ],
    external: ['vue', 'lodash-es']
}